<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=0">
    <meta content="telephone=no" name="format-detection" />
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title>知识库-知识圈</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/global.css">
    <link rel="stylesheet" type="text/css" href="css/media.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
    <script type="text/javascript" src="js/lib/loading.js"></script>
</head>

<body id="app">
    <!-- 头部 -->
    <header class="header">
        <a href="javascript:void(0);" title="用户中心" class="icon userIcon" @click="userSideFn();"></a>
        <div class="clearfix search-box" @click="search();">
            <input type="button" class="fl search-btn">
            <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30">
        </div>
        <a href="javascript:void(0);" title="" class="icon addIcon" @click="add();"></a>
    </header>

    <!-- 知识圈 -->
    <section class="padT23 padB23 knowledge" v-show="!showModal">
        <!-- tab -->
        <ul class="clearfix tabUl quesTab tabFixed">
            <li v-bind:class="{'on':tabs==0}" @click="slides(0,$event)">推荐</li>
            <li v-bind:class="{'on':tabs==1}" @click="slides(1,$event)">最新</li>
            <li v-bind:class="{'on':tabs==2}" @click="slides(2,$event)">最热</li>
            <li v-bind:class="{'on':tabs==3}" @click="slides(3,$event)">分类</li>
        </ul>
        <div class="tabBox">
            <!-- 推荐 -->
            <ul class="tabCont quesCont askCont" v-if="screenSide" v-cloak>
                <li class="answer" v-for="info in ansList" v-touch:swipe="swipeLeft($event)" v-touch-options:swipe="{ direction: 'horizontal' }">
                    <a href="circleDetail.html?id={{info.id}}&back=knowledge.html" class="db">
                        <div class="clearfix line95">
                            <img :src="info.headPic" class="fl borderRadius wh45">
                            <span class="db fl marL24 font20 color72">{{ info.author }}</span>
                            <span class="fr font20 colorb6">{{ info.date }}</span>
                        </div>
                        <h3 class="font26 color22 titles">{{ info.title }}</h3>
                        <span class="db font26 color21 descText">{{ info.content | delimages | delhtml}}</span>
                        <div class="clearfix marT24 askImgBox">
                            <!--<span class="db fl j_6 askImg" v-for='(index, item) in info.contentPicture' track-by="$index"><img data-src="{{item}}" src="images/imgload.gif" alt="" class="loadImg"></span>-->
                            <span v-for="(index, item) in info.content | imageurls" track-by="$index">
                                <span class="db fl j_6 askImg" v-if="index < 4">
                                    <img data-src="{{item}}" src="images/imgload.gif" alt="" class="loadImg">
                                </span>
                            <em class="imgNum" v-if="index >= 4">{{info.content.length}}</em>
                            </span>
                        </div>
                        <div class="clearfix">
                            <template v-if="info.isTop == 1">
                                <span class="fl zdIcon"></span>
                            </template>
                            <!-- 带精字图标的话题 -->
                            <template v-if="info.isEssence == 1">
                                <span class="fl jIcon"></span>
                            </template>
                            <span class="fr comIcon">{{ info.commentCount }}</span>
                            <span class="fr view">{{ info.readCount }}</span>
                            <!-- 如果是已点赞的，则有class="on" -->
                            <span class="fr likeIcon" v-bind:class="{'on':info.likeCount>0}">{{ info.likeCount }}</span>
                        </div>
                    </a>
                    <div class="font26 dib shareColl two">
                        <a href="javascript:void(0);" @click="share({shareId:info.id,shareTit:info.title,sharePic:info.content},$event);" class="shareIcon"></a>
                        <a href="javascript:void(0);" @click="Collection({dataID:info.id},$event);" class="collIcon"></a>
                    </div>
                </li>
                <span class="loading-more">加载更多...</span>
            </ul>
            <!-- 分类 -->
            <div class="tabCont quesCate bgff" v-else="screenSide" v-cloak>
                <div class="padB24 borderspace" v-for="info in classify">
                    <div class="pr pad24">
                        <span class="db font18 tits">{{ info.typeName }}</span>
                        <!-- <a href="javascript:void(0);" class="pa more">全部</a> -->
                    </div>
                    <ul class="clearfix knowCate">
                        <li v-for="info in info.circleList">
                            <a href="circleList.html?id={{info.id}}&back=knowledge.html" class="clearfix">
                                <span class="db j_1 photo"><img data-src="{{ info.pic }}" src="images/imgload.gif" class="loadImg" /></span>
                                <div class="fl text">
                                    <span class="db font24 color21 ell">{{ info.name }}</span>
                                    <span class="db font18 colorb6 ell">{{ info.personCount }}人加入</span>
                                </div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- 用户中心 -->
    <section v-show="userSide" v-cloak>
        <div class="popbg" @click="userSideFn();"></div>
        <div class="pad24 userSide">
            <a href="myUserCenter.html?back=knowledge.html" class="db">
                <div class="clearfix nameInfo">
                    <img src="images/user.png" class="head" />
                    <span class="dib font28 colorff name">{{user.userName}}<em class="color3b">({{user.level}})</em><br/><em class="font18">{{user.department}}</em></span>
                    <i class="next"></i>
                </div>
            </a>
            <ul class="font28 sideBox">
                <li><a href="dynamicKnowledge.html?back=knowledge.html" class="db sideDate zsIcon">知识动态</a></li>
                <li><a href="myShare.html?back=knowledge.html" class="db sideDate sjIcon">我的分享</a></li>
                <li><a href="myCare.html?back=knowledge.html" class="db sideDate gzIcon">我的关注</a></li>
                <li><a href="vault.html?back=knowledge.html" class="db sideDate jkIcon">我的金库</a></li>
                <li>
                    <a href="newsList.html?back=knowledge.html" class="db sideDate xxIcon">消息中心</a>
                    <i :class="user.IsNotice>0 ? 'hasNotice' : ''"></i>
                </li>
                <li><a href="myCollect.html?back=knowledge.html" class="db sideDate scIcon">我的收藏</a></li>
                <li><a href="shop.html?back=knowledge.html" class="db sideDate dhIcon">兑换超市</a></li>
                <!-- <logout v-bind:username="user.uid"></logout> -->
            </ul>
        </div>
    </section>

    <share :show.sync="showModal"></share>
    <!-- template for the modal component -->
    <script type="x/template" id="share-template">
        <!-- 头部 -->
        <header class="header" v-show="show">
            <a href="javascript:;" title="返回" class="icon back" @click="cancel();"></a>
            <div class="clearfix search-box searchBigBox">
                <input type="button" class="fl search-btn" @click="search();">
                <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30" v-model="query">
            </div>
            <a href="javascript:void(0);" title="确认" @click='ok();' class="text">确认</a>
        </header>

        <!-- 通讯录 -->
        <section class="padT23 addrBook" v-show="show">
            <div v-for="info in users">
                <span class="db pad24 font18 color72">{{info.type}}</span>
                <ul id='uluser' class="padLR24 bgff">
                    <!-- 选中则加上 class="on" -->
                    <li dataID='{{info.uid}}' class="padTB24 font24 color21 borderB" @click="checked($event);" v-for="info in info.userList | filterBy query in 'uname'">
                        {{info.uname }}
                    </li>
                </ul>
            </div>

        </section>
    </script>

    <!-- 底部 -->
    <footer class="clearfix footer" v-if="!showModal">
        <a href="index.html" class="footerIcon fhome" title="我要看">我要看</a>
        <a href="asking.html" class="footerIcon fques" title="我要问">我要问</a>
        <a href="knowledge.html" class="footerIcon on fknow" title="知识圈">知识圈</a>
    </footer>

    <!-- 更多 -->
    <template v-if="addShow==true" v-cloak>
        <div class="cateBoxBg" @click="add();"></div>
        <ul class="cateBox">
            <li><a href="circle.html">加入圈子</a></li>
            <li><a href="publish.html?back=knowledge.html">发表</a></li>
        </ul>
    </template>

    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/vue.js"></script>
    <script type="text/javascript" src="js/lib/alert.js"></script>
    <script src="js/lib/hammer.min.js"></script>
    <script src="js/lib/vue-touch.js"></script>
    <script type="text/javascript" src="js/lib/common.js"></script>
    <script type="text/javascript" src="js/lib/global.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript" src="js/knowledge.js"></script>
    <script type="text/javascript">
        // 比例
        //       myJS.imgScale('.j_1', '1', '1');
        //   	myJS.imgScale('.j_6', '6', '5');
        //   	myJS.ImgFull('.loadImg');

        //   	// tab
        // $('.tabCont:eq(0)').show().siblings().hide();
        //       $('.tabUl li').bind('click', function () {
        //           var tab = $('.tabUl li').index(this);
        //           $('.tabCont').eq(tab).show().siblings().hide();
        //           $(this).addClass('on').siblings().removeClass('on');
        //       });
    </script>
</body>

</html>